#!/usr/bin/env bash

project=mongo-sync
while true
do

    python_pid=`ps -ef|grep "mongo_sync.py"|grep -v grep|awk '{print $2}'`
    if [ "$python_pid" == '' ]; then
        nohup python mongo_sync.py ${project} > /dev/null 2>&1 &
    fi

sleep 600
done

